Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dasherize

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dasherize

recursively transform key strings to dash-case

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
82K
decreased by-79.65%
Maintainers
1
Weekly downloads
 
Created

What is dasherize?

The dasherize npm package is used to convert strings into a dasherized (kebab-case) format. This can be particularly useful for creating URL-friendly strings, CSS class names, or other identifiers that require a consistent, lowercase, hyphen-separated format.

What are dasherize's main functionalities?

Basic Dasherization

Converts camelCase strings into dasherized format. This is useful for transforming variable names or other identifiers into a more readable and URL-friendly format.

const dasherize = require('dasherize');
console.log(dasherize('helloWorld')); // Output: 'hello-world'

Dasherize with Spaces

Converts strings with spaces into dasherized format. This is useful for transforming titles or phrases into a consistent, URL-friendly format.

const dasherize = require('dasherize');
console.log(dasherize('Hello World')); // Output: 'hello-world'

Dasherize with Underscores

Converts snake_case strings into dasherized format. This is useful for transforming database field names or other identifiers into a more readable and URL-friendly format.

const dasherize = require('dasherize');
console.log(dasherize('hello_world')); // Output: 'hello-world'

Other packages similar to dasherize

Keywords

FAQs

Package last updated on 21 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc